While a software program is executing, the program uses resources manifested by processor cycles, I/O invocations, and memory space, for example. Resource uses are sometimes referred to as program runtime costs. Some program runtime costs can be identified by a source code review. However, source code is not always available, and even when source is available the runtime behavior of a program is often difficult to predict based on the source code alone. Predicting program behavior based on source code alone is particularly difficult with programs that contain code generated from thousands if not millions of lines of source code.
Accordingly, some tools have been created to directly measure program resource usage, in order to assist developers in reducing resource usage without an unacceptable loss of desired program functionality. In particular, various software profiler tools exist. Some profilers report only the amount of resources consumed within a particular procedure. Some profilers display, for each selected procedure, the fraction of total program execution time that was spent executing that procedure and the procedures it called. Some profilers provide resource usage information only for a calling procedure and its immediate called procedure. Some profilers display a graph in which nodes represent components of a system, and edges represent interactions among components. The nodes and/or edges of the graph are annotated with costs.